package Vistas;
import java.awt.event.ActionListener;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;

import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaEquipo extends javax.swing.JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}


    /** Creates new form JFrameArbitro */
    public VentanaEquipo() {
        initComponents();
    }

    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        GroupLayout jPanel1Layout = new GroupLayout((JComponent)jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jLabelFecha = new javax.swing.JLabel();
        jButtonAgregar = new javax.swing.JButton();
        jButtonSalir = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder("Datos del Equipo")));
        jPanel1.setFont(new java.awt.Font("Calibri", 1, 18));

        jLabelFecha.setFont(new java.awt.Font("Calibri", 1, 14));
        {
        	jLabelApellido = new JLabel();
        	jLabelApellido.setText("Codigo:");
        }
        {
        	jTextCodigo = new JTextField();
        }
        {
        	jLabelNombre = new JLabel();
        	jLabelNombre.setText("Nombre:");
        }
        {
        	jTextNombre = new JTextField();
        }
        {
        	jLabelAño = new JLabel();
        	jLabelAño.setText("Año de Fundacion:");
        }
        {
        	jTextAnoFund = new JTextField();
        }
        {
        	jLabelCiudad = new JLabel();
        	jLabelCiudad.setText("Ciudad:");
        }
        {
        	jTextCiudad = new JTextField();
        }
        {
        	jLabelEstadio = new JLabel();
        	jLabelEstadio.setText("Nombre del Estadium:");
        }
        {
        	jTextNombreEstadio = new JTextField();
        }
        {
        	jLabel1 = new JLabel();
        	jLabel1.setText("Jugadores (Archivo)");
        }
        {
        	ComboBoxModel jComboJugadoresModel = 
        		new DefaultComboBoxModel(
        				new String[] { "Lista Jugadores 1", "Lista Jugadores 2","Lista Jugadores 3","Lista Jugadores 4"});
        	jComboJugadores = new JComboBox();
        	jComboJugadores.setModel(jComboJugadoresModel);
        }
        jPanel1Layout.setVerticalGroup(jPanel1Layout.createSequentialGroup()
        	.addGap(7)
        	.addGroup(jPanel1Layout.createParallelGroup()
        	    .addComponent(jTextCodigo, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addGroup(GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
        	        .addGap(10)
        	        .addComponent(jLabelApellido, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)))
        	.addGap(26)
        	.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(jTextNombre, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(jLabelNombre, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addGap(17)
        	.addGroup(jPanel1Layout.createParallelGroup()
        	    .addGroup(GroupLayout.Alignment.LEADING, jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	        .addComponent(jLabelFecha, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
        	        .addComponent(jLabelAño, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	    .addComponent(jTextAnoFund, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addGap(23)
        	.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(jTextCiudad, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(jLabelCiudad, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addGap(17)
        	.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(jTextNombreEstadio, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(jLabelEstadio, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addGap(20)
        	.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(jComboJugadores, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(jLabel1, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addContainerGap(16, 16));
        jPanel1Layout.setHorizontalGroup(jPanel1Layout.createSequentialGroup()
        	.addContainerGap()
        	.addComponent(jLabelFecha, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	.addGap(21)
        	.addGroup(jPanel1Layout.createParallelGroup()
        	    .addGroup(GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
        	        .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 187, GroupLayout.PREFERRED_SIZE)
        	        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
        	        .addComponent(jComboJugadores, GroupLayout.PREFERRED_SIZE, 169, GroupLayout.PREFERRED_SIZE)
        	        .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        	    .addGroup(jPanel1Layout.createSequentialGroup()
        	        .addGroup(jPanel1Layout.createParallelGroup()
        	            .addComponent(jLabelEstadio, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 165, GroupLayout.PREFERRED_SIZE)
        	            .addGroup(GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
        	                .addComponent(jLabelCiudad, GroupLayout.PREFERRED_SIZE, 109, GroupLayout.PREFERRED_SIZE)
        	                .addGap(56))
        	            .addGroup(GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
        	                .addComponent(jLabelAño, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	                .addGap(38))
        	            .addGroup(GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
        	                .addComponent(jLabelNombre, GroupLayout.PREFERRED_SIZE, 84, GroupLayout.PREFERRED_SIZE)
        	                .addGap(81))
        	            .addGroup(GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
        	                .addComponent(jLabelApellido, GroupLayout.PREFERRED_SIZE, 90, GroupLayout.PREFERRED_SIZE)
        	                .addGap(75)))
        	        .addGap(7)
        	        .addGroup(jPanel1Layout.createParallelGroup()
        	            .addGroup(jPanel1Layout.createSequentialGroup()
        	                .addComponent(jTextNombreEstadio, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE))
        	            .addGroup(jPanel1Layout.createSequentialGroup()
        	                .addComponent(jTextCiudad, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE))
        	            .addGroup(jPanel1Layout.createSequentialGroup()
        	                .addComponent(jTextAnoFund, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE))
        	            .addGroup(jPanel1Layout.createSequentialGroup()
        	                .addComponent(jTextNombre, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE))
        	            .addGroup(jPanel1Layout.createSequentialGroup()
        	                .addComponent(jTextCodigo, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE)))
        	        .addGap(0, 42, Short.MAX_VALUE)))
        	.addContainerGap(95, 95));

        jButtonAgregar.setText("Agregar");
        jButtonAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAgregarActionPerformed(evt);
            }
        });

        jButtonSalir.setText("Salir");
        jButtonSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSalirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setVerticalGroup(layout.createSequentialGroup()
        	.addContainerGap(41, 41)
        	.addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, 331, GroupLayout.PREFERRED_SIZE)
        	.addGap(40)
        	.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(jButtonSalir, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(jButtonAgregar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addContainerGap(35, 35));
        layout.setHorizontalGroup(layout.createSequentialGroup()
        	.addContainerGap(62, 62)
        	.addGroup(layout.createParallelGroup()
        	    .addGroup(layout.createSequentialGroup()
        	        .addGap(0, 0, Short.MAX_VALUE)
        	        .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, 491, GroupLayout.PREFERRED_SIZE))
        	    .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        	        .addGap(84)
        	        .addComponent(jButtonAgregar, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
        	        .addGap(63)
        	        .addComponent(jButtonSalir, GroupLayout.PREFERRED_SIZE, 99, GroupLayout.PREFERRED_SIZE)
        	        .addGap(0, 145, Short.MAX_VALUE)))
        	.addContainerGap(41, 41));

        pack();
        this.setSize(604, 509);
    }// </editor-fold>//GEN-END:initComponents


private void jButtonAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAgregarActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButtonAgregarActionPerformed


private void jButtonSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSalirActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButtonSalirActionPerformed




    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VentanaEquipo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VentanaEquipo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VentanaEquipo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VentanaEquipo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VentanaEquipo().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonAgregar;
    private javax.swing.JButton jButtonSalir;
    private javax.swing.JLabel jLabelFecha;
    private javax.swing.JPanel jPanel1;
    private JLabel jLabelAño;
    private JTextField jTextAnoFund;
    private JComboBox jComboJugadores;
    private JLabel jLabel1;
    private JTextField jTextNombreEstadio;
    private JLabel jLabelEstadio;
    private JTextField jTextCiudad;
    private JLabel jLabelCiudad;
    private JTextField jTextNombre;
    private JLabel jLabelNombre;
    private JTextField jTextCodigo;
    private JLabel jLabelApellido;
    // End of variables declaration//GEN-END:variables
   
    

    public void agregarListener(ActionListener accion){
	   jButtonAgregar.addActionListener(accion);
           jButtonSalir.addActionListener(accion);
	}
    public void limpiarCampos(){
  
    	jTextAnoFund.setText("");
        jTextCodigo.setText("");
        jTextCiudad.setText("");
        jTextNombreEstadio.setText("");
        jTextNombre.setText("");
    }
    public void mostrarMensaje(String msj){
    JOptionPane.showMessageDialog(this, msj);
    }
    public void salir(){
    System.exit(0);
    }


	public JTextField getjTextAnoFund() {
		return jTextAnoFund;
	}

	public JComboBox getjComboJugadores() {
		return jComboJugadores;
	}
	public JTextField getjTextNombreEstadio() {
		return jTextNombreEstadio;
	}
	public JTextField getjTextCiudad() {
		return jTextCiudad;
	}

	public JTextField getjTextNombre() {
		return jTextNombre;
	}


	public JTextField getjTextCodigo() {
		return jTextCodigo;
	}


	
	
	   public String  getCodigo(){
			return jTextCodigo.getText();
		}
		
	    public String getNombre(){
			return jTextNombre.getText();
		}
	    public String getanoFundacion(){
	                return jTextAnoFund.getText();
	    }
	    public String getestadio(){
	                return jTextNombreEstadio.getText();
	    }
	    public String getciudad(){
			return jTextCiudad.getText();
		}

}
